const { defineConfig } = require('@vue/cli-service')

module.exports = defineConfig({
  transpileDependencies: true,

  devServer: {
    port: 8000, // 可选，默认就是8000
    proxy: {
      '/ISAPI': {
        target: 'http://127.0.0.1:80',
        changeOrigin: true
      },
      '/SDK': {
        target: 'http://127.0.0.1:80',
        changeOrigin: true
      },
      '/webSocketVideoCtrlProxy': {
        target: 'http://127.0.0.1:80',
        ws: true,              // WebSocket 必须启用 ws: true
        changeOrigin: true
      }
    }
  }
})
